﻿#ifndef COUNTDOWN_H
#define COUNTDOWN_H

#include <QWidget>
#include <QTimer>

class CountDown : public QWidget
{
    Q_OBJECT
public:
    explicit CountDown(QWidget *parent = nullptr);

    void showCountDown();

    //处理在倒计时前打出牌的处理
    void stopCountDown();

signals:
    void notMuchTime();
    void timeout();
protected:
    //绘图处理函数
    void paintEvent(QPaintEvent* ev);

private:
    QPixmap m_clock;
    QPixmap m_number;
    QTimer * m_timer;
    int m_count; //倒计时的总时长
};

#endif // COUNTDOWN_H
